// var mongoose = require('../config/config');
var mongodb = require('../config/config');//引入config中的mongodb对象  
var mongoose = mongodb.mongoose;//获取mongoose
mongoose.Promise = global.Promise;

var Schema = mongoose.Schema; 
var ObjectId = Schema.Types.ObjectId; 
 
exports.mongodb = mongodb;//导出mongodb  
exports.mongoose = mongoose; 
exports.Schema = Schema;  
exports.ObjectId = ObjectId; 
exports.Mixed = Schema.Types.Mixed;